With rapid development of network technologies, network communication services are more and more diversified. For example, Voice over IP (VoIP) Internet Protocol Television (IPTV), and High Speed Internet (HSI) are booming. Users are increasing rapidly, which brings enormous requirements for network bandwidth. Congestion occurs inevitably on bearer networks, especially on convergence networks of service providers. In the discard mechanism currently applied to IP Quality of Service (QoS) algorithm, packets are discarded randomly. When selecting the congestion packets for discarding, the discard mechanism does not consider the impact brought by the discarded messages on a receiver.
For certain data transport protocols such as Real-time Transport Protocol (TCP), when a packet is discarded, the receiver requests to retransport the lost packet. Such a mechanism is scarcely practicable to networks which perform multicast of real-time streams such as audio stream and video stream. The space of the buffer on the receiver is limited, and there is insufficient time for requesting and accepting retransported packets in the services which are highly real-time.
During IPTV video transport, the loss of different IPTV packets affects the visual experience of users rather differently. That is, visual sensitivity of end users varies with different discarded IPTV packets. The discarding of certain IPTV packets has a little impact on pictures, and is hardly perceivable by the end users; but the loss of other IPTV packets has harsh impact on pictures, for example, leading to exceptions such as dim screen, which is easily perceivable by the end users. When a network device is congested, the traditional solution is to discard packets randomly, without considering different impact caused by discarding of different IPTV packets on the screen of a receiving terminal.
A video stream includes a series of Group of Pictures (GOP). A GOP includes an I frame, multiple P frames, and multiple B frames. In the H.264-based IPTV system, the prior art puts forward an intelligent discard method based on service perception: When a network is congested and some packets have to be discarded, the network device discards packets of different frame types selectively. First, a NAL Reference Indicator (NRI) field in a Network Abstraction Layer (NAL) packet header of H.264 is detected on a Digital Subscriber Line Access Multiplexer (DSLAM); the DSLAM network node judges whether a packet needs to be discarded according to the value of NRI; if NRI is 0, it indicates that the video frame is a non-reference frame, and the congested DSLAM network node discards this packet first; when discarding packets, the DSLAM network node discards B frames first, and P frames, and finally, the I frame. If a corresponding IP packet of a frame is discarded, IP packets of the whole frame are discarded. Such a discard solution is defective in the following aspects:
(1) Limitation in the coding mechanism: The solution supports only H.264 coding, but does not support MPEG-2 coding.
(2) Limitation in the encapsulation mechanism: The solution supports only RTP-encapsulated H.264 video streams, but does not support RTP-encapsulated MPEG2 video streams or MPEG2-TS encapsulated video streams.
(3) The NRI indicates the frame type; one frame corresponds to multiple IP packets; among the multiple IP packets, discarding of only certain IP packets affect the screen of the receiving terminal. Therefore, when the NRI is used as a basis for judging whether a packet needs to be discarded, the whole frame corresponding to the NRI value is discarded, which makes the network device unable to schedule or forward the packets one by one and deteriorates user experience of the receiver.